package com.mitasoft.library;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

public class EndavaLibraryActivity extends Activity {

	private LinearLayout btnSearchBook;
	private LinearLayout btnMyBooks;

	private OnClickListener OnSearchBookClicked = new OnClickListener() {
		public void onClick(View v) {
			Intent searchBook = new Intent(EndavaLibraryActivity.this,
					SearchBookActivity.class);
			startActivity(searchBook);
		}
	};

	private OnClickListener OnMyBooksClicked = new OnClickListener() {
		public void onClick(View v) {
			Intent myBooks = new Intent(EndavaLibraryActivity.this,
					MyBooksActivity.class);
			startActivity(myBooks);
		}
	};

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		btnSearchBook = (LinearLayout) findViewById(R.id.l1);
		btnMyBooks = (LinearLayout) findViewById(R.id.l2);

		btnSearchBook.setOnClickListener(OnSearchBookClicked);
		btnMyBooks.setOnClickListener(OnMyBooksClicked);
	}

}